<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="created" content="2018-10-23T06:18:10.521000000">
    <meta name="changed" content="2020-01-08T06:18:42.262000000">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Language" content="en">
    <title>
      Oscillation errors
    </title>
    <link rel="stylesheet" type="text/css" href="../../style.css">
  </head>
  <body>
    <div class="maindiv">
      <h1>
        Oscillation errors
      </h1>
      <p>
        The propagation algorithm, which normally works silently without any problems, will become very visible when you create a circuit that oscillates.
      </p>
   <p align="center">
        <img class="notscal" src="../../../../img-guide/prop-oscillate-before.png" alt="#########">
      </p>
      <p>
        This circuit is currently in a stable condition. But if you change the input to 1, the circuit will effectively enter an infinite loop. After a while, Logisim will simply give up and show an "Oscillation apparent" message telling you that it believes that the circuit is oscillating.
      </p>
   <p align="center">
        <img class="notscal" src="../../../img-guide/prop-oscillate-error.png" alt="#########">
      </p>
      <p>
        It will display the values it has at the time it gives up. These values will look wrong - in this screen shot, the AND gate is emitting 1 although one of its inputs is 0, but it could be that the NOT gate has a 1 input and a 1 output.
      </p>
      <p>
        Logisim helpfully circles in red each location that seems to be involved in the oscillation. If an involved point lies within a subcircuit, Logisim will draw that subcircuit's outline in red.
      </p>
      <p>
        When Logisim detects oscillation, it shuts down all further simulation. You can re-enable simulation using the menu <b class=menu>|&nbsp;Simulate&nbsp;|</b>→<b class=menu>|&nbsp;Simulation Enabled&nbsp;|</b>.
      </p>
      <p>
        Logisim detects oscillation using a fairly simple technique: If the circuit simulation seems to many iterations, then it will simply give up and report oscillation. (The points it identifies as being involved are those that were touched in the last 25% of the iterations.) Thus, it could erroneously report oscillation, particularly if you are working with an exceptionally large circuit; but it would be one that is larger than any I have built using Logisim. In any case, if you are confident that the reporting is in error, you can configure the number of iterations completed before oscillation occurs via the <a href="../opts/index.html">Project Options</a> window's <a href="../opts/opts-simulate.html">Simulation tab</a>.
      </p>
      <p>
        <b>Next:</b> <a href="shortcome.html">Shortcomings</a>.
      </p>
    </div>
  </body>
</html>
